package com.wu01.demo.service;

import com.wu01.demo.Entity.Emp;
import com.wu01.demo.mapper.EmpMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

@Service
public class EmpService {
    @Autowired
    EmpMapper empMapper;

    @Cacheable(cacheNames = "emp")
    public Emp getEmp(String id){
        return empMapper.getEmp(id);
    }
}
